<template>
  <div>
    <tabbar class="nav-footer">
      <tabbar-item class="nav-footer-item">
        <span slot="icon" class="iconfont icon-home"></span>
        <span slot="label">首页</span>
      </tabbar-item>
      <tabbar-item show-dot class="nav-footer-item">
        <span slot="icon" class="iconfont icon-weibiaoti2fuzhi12"></span>
        <span slot="label">会员</span>
      </tabbar-item>
      <tabbar-item selected link="/component/demo" class="nav-footer-item">
        <span slot="icon" class="iconfont icon-gouwuche"></span>
        <span slot="label">购物车</span>
      </tabbar-item>
      <tabbar-item class="nav-footer-item">
        <span slot="icon" class="iconfont  icon-xiazai17"></span>
        <span slot="label">搜索</span>
      </tabbar-item>
    </tabbar>
  </div>
</template>
<script>
import { Tabbar, TabbarItem } from 'vux'
export default {
  components: {
    Tabbar,
    TabbarItem
  }
}
</script>
<style lang="scss" scoped>
.nav-footer {
  font-size: 16px;
  display: flex;
  position: fixed;
  bottom: 0;
  height: 50px;
  width: 100%;
  border-top: 1px solid #e7e7e7;
  background-color: #fff;
  .nav-footer-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 25%;
    .badge {
      position: absolute;
      top: 3%;
      left: 50%;
      width: 14px;
      height: 14px;
      border-radius: 7px;
      background-color: #e4393c;
      text-align: center;
      line-height: 14px;
      color: white;
      font-size: 12px;
    }
  }
}
.active {
  color: #26a2ff;
}
</style>
